import request from '@/config/axios'

// 合同管理列表
export const getContractlList = (data) => {
  return request.get({
    url: '/service/contract/page',
    params: data
  })
}

// 详情
export const getContractDetail = (id) => {
  return request.get({
    url: '/service/contract/get',
    params: { id }
  })
}

// 新增
export const addContractl = (data) => {
  return request.post({
    url: '/service/contract/create',
    data,
  })
}

// 编辑
export const editContractl = (data) => {
  return request.put({
    url: '/service/contract/update',
    data,
  })
}

// 删除
export const deleteContractl = (id) => {
  return request.delete({
    url: '/service/contract/delete',
    params: { id }
  })
}

// 导入
export const ImprotContractl = (data) => {
  return request.upload({
    url: '/service/contract/import-materials',
    data,
  })
}

// 导出
export const exportContractl = (data) => {
  return request.download({
    url: '/service/contract/export-excel',
    params: data,
  })
}